<div class="row">
<script>
/*
$(document).ready(function(){
  setTimeout(function () { test(); }, 500);
        function test(){
          $("table").addClass("table-bordered table-hover table-striped");
      }
   });
   */
</script>

<div class="col-md-4"> 
<h3 style="text-align: center;">监控信息</h3>
<?php
header("Content-type: text/html; charset=utf-8");
$con = mysql_connect("113.215.1.161","root","root");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
//code
mysql_select_db("mydb", $con);//选库
mysql_query("set names 'utf8'");
$result = mysql_query("SELECT * FROM wechat ORDER BY lossRate DESC");
echo "<table id='store' class='table-bordered table-hover table-striped' align='center' width='80%'>
<tr>
<th>内容</th>
<th>域名</th>
<th>ip</th>
<th>丢包率</th>
</tr>";
while($row = mysql_fetch_array($result))
  {
    if ($row["lossRate"]>0){
      echo "<tr style='color:red;'>";
    }
    else{echo "<tr>";}
  
  echo "<td>" . $row['obj'] . "</td>";
  echo "<td>" . $row['domain'] . "</td>";
  echo "<td>" . $row['ip'] . "</td>";
  printf("<td>%.2f%%</td>",$row['lossRate']);

  echo "</tr>";
  }
echo "</table>";

mysql_close($con);
?> 
</div>

<div class="col-md-4"> 
<h3 style="text-align: center;">调度表</h3>
<?php include "/var/www/html/wechat/wechatTab.php"; ?>
</div>

<div class="col-md-4"> 

<h3 style="text-align: center;">调度信息</h3>
<div class="panel panel-default">
<div class="panel-body">
<?php include "/var/www/html/wechat/wechatDD.php"; ?>
</div>
</div>
</div>
</div>